Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow using thirdparty VID for reboot interface #177

Merged

Conversation

JohnAZoidberg
Copy link

@JohnAZoidberg JohnAZoidberg commented Nov 17, 2024

I'm implementing the reboot interface for a custom device. But I'm not using the Raspberry PI vendor ID.
There's no way currently to allow those third party devices to reboot.

With this change I can reboot my device from application firmware into bootloader with:

picotool reboot --vid 0x32ac --pid 0x001f -f -u

JohnAZoidberg added a commit to FrameworkComputer/inputmodule-rs that referenced this pull request Nov 17, 2024
@will-v-pi
Copy link

Could you rebase this and target it at the develop branch instead of master?

@JohnAZoidberg JohnAZoidberg changed the base branch from master to develop November 19, 2024 10:34
@JohnAZoidberg
Copy link
Author

Could you rebase this and target it at the develop branch instead of master?

@will-v-pi sure, done!

Copy link

@will-v-pi will-v-pi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, that looks good and I've checked it works for me too

Could you fix the Bazel build and then we can merge this (@armandomontanez can hopefully help with that if needed)?

@armandomontanez
Copy link
Contributor

The Bazel fix is fortunately trivial:

diff --git a/picoboot_connection/BUILD.bazel b/picoboot_connection/BUILD.bazel
index fd8b15b..b2fac4d 100644
--- a/picoboot_connection/BUILD.bazel
+++ b/picoboot_connection/BUILD.bazel
@@ -19,5 +19,6 @@ cc_library(
         "@pico-sdk//src/common/boot_picoboot_headers",
         "@pico-sdk//src/rp2_common/boot_bootrom_headers",
         "@pico-sdk//src/rp2_common/pico_bootrom:pico_bootrom_headers",
+        "@pico-sdk//src/rp2_common/pico_stdio_usb:reset_interface_headers",
     ],
 )

Filtering by `--vid` and `--pid` is not enough currently.

I'm implementing the reboot interface for a custom device. But I'm not using the Raspberry PI vendor ID.
There's no way currently to allow those third party devices to reboot.

With this change I can reboot my device from application firmware into bootloader with:

```
picotool reboot --vid 0x32ac --pid 0x001f -f -u
```

Signed-off-by: Daniel Schaefer <[email protected]>
@JohnAZoidberg
Copy link
Author

JohnAZoidberg commented Nov 20, 2024

Thanks @armandomontanez

@will-v-pi will-v-pi merged commit 2f2e8df into raspberrypi:develop Nov 20, 2024
32 checks passed
@JohnAZoidberg JohnAZoidberg deleted the thirdparty-stdio_usb branch November 20, 2024 15:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants